
import json
import requests


def login():
    Environmenta = "https://www-api2.gpmine.com/"#切换测试环境和线上环境
    login_url = Environmenta + "v2/user/auth/login"
    login_data = {
        "name": "15986673013", "password": "111111"
    }
    login_response = requests.post(url=login_url, data=login_data)
    print(login_response.status_code)
    print(login_response.text)


def login1():
    rooms_url = 'https://live-zull-aiccp.xiyizb.com/player/1.0/getAnchorRooms'
    rooms_headers = {'token': self.token}
    rooms_response = requests.get(url=rooms_url, headers=rooms_headers)
    rooms_response.status_code

    with self.client.post(url=rooms_url, headers=rooms_headers) as response1:

    with self.client.post(url=rooms_url, headers=rooms_headers) as response:
        print(response.)
        print(response.status_code)

        print(response.content)

login()






